import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/Login/index',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/Admin/managerInfo',
    method: 'get',
    params: { token }
  })
}


export function fetchList(query) {
  return request({
    url: '/User/index',
    method: 'get',
    params: query
  })
}

export function destroy(query) {
  return request({
    url: '/User/delete',
    method: 'get',
    params: query
  })
}


export function update(query) {
  return request({
    url: '/User/update',
    method: 'post',
    data: query
  })
}


export function getTypes() {
  return request({
    url: '/User/getTypes',
    method: 'get'
  })
}

export function updatePassword(data) {
  return request({
    url: '/Admin/updatePassword',
    method: 'post',
    params: data
  })
}

